package kassiopeia.commons.util;

import java.util.Date;
import org.joda.time.DateTime;

public final class DateTimeUtils {

    private static final Long TWO_SECONDS_IN_MILLISECONDS = 2000L;

    private DateTimeUtils() {}

    public static Date getCurrentDate() {
        return (new DateTime()).toDate();
    }

    public static Date getTwoSecondsAgoDate() {
        return new Date(getCurrentTimeMillis() - TWO_SECONDS_IN_MILLISECONDS);
    }

    public static long getCurrentTimeMillis() {
        return org.joda.time.DateTimeUtils.currentTimeMillis();
    }

}
